package com.medical.app.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.medical.app.entity.MedicalRecord;

import java.util.List;

public interface MedicalRecordMapper extends BaseMapper<MedicalRecord> {
    default List<MedicalRecord> selectByPatientId(Long patientId) {
        QueryWrapper<MedicalRecord> qw = new QueryWrapper<>();
        qw.lambda().eq(MedicalRecord::getPatientId, patientId);
        return this.selectList(qw);
    }
}